/*
 *  Description: BOAT XU SOFT FHSS
 *  Version: V1.00
 *  Author: boat xu
 *  Email: xifengzui@outlook.com
 *  Date: 2020-07-14 13:39:30
 *  LastEditTime: 2020-07-18 11:56:04
 */ 
#ifndef __FREQ_HOPPING_H__
#define __FREQ_HOPPING_H__
#include "bsf_types.h"
#include "bsf_itypes.h"

#define BSF_FREQTABLE_LOOP_CNT 24

typedef struct 
{
    b_u8_t  freq;
    b_u8_t  index;
    b_u8_t  loopLen;//set this parms for a loop table
    b_u16_t seed;
}bsf_FreqHopping;

void bsf_freqHopping_init(bsf_FreqHopping *fhi);
void bsf_freqHopping_set(b_u16_t seed,b_u8_t *table);
void bsf_freqHopping_reset(void);
void bsf_freqHopping_resetDefault(void);
void bsf_freqHopping_jumpToNext_loop(void);
void bsf_freqHopping_jumpToNext(void);
void bsf_freqHopping_lowerWeight(void);
void bsf_freqHopping_recoverWeight(void);
void bsf_freqHopping_setToShadowTable(void);
b_u8_t *bsf_freqHopping_getShadowTable(void);
b_u16_t bsf_freqHopping_getSeed(void);
#endif